I. Field of the Invention
The present invention relates to synchronous communication of data. More particularly, the present invention relates to a novel and improved method and apparatus for switching between two or more different data sources on a synchronous data port having an external timing reference.
II. Description of the Related Art
In the field of data communications, several well-known standards exist for communicating serial data from one communication device to another communication device. These standards include RS-232, RS-422, T1, and E1 and the like. In accordance with these standards, binary data is transmitted over a serial communication line by a serial driver device, and received at the other end of the serial communication line by a serial receiver device. In a synchronous data communication system, this binary data is transmitted according to the timing of a reference clock signal.
In a communication system where high-speed, reliable data communication is required, such as in a telecommunications network application, redundant communication resources are often provided. For example, the system architecture may provide a "one plus one" redundancy scheme for serial driving devices so that if one driver fails, the other will be switched onto the communication line in order to provide continuing data communication with the receiver device.
An example of a wireless communication system which uses high-speed, redundant communication resources may be found in U.S. patent application Ser. No. 08/513,306, filed Aug. 9th, 1995, entitled "METHOD AND APPARATUS FOR PROVIDING A RELIABLE PACKET SWITCHED INTERCONNECTION SYSTEM," assigned to the assignee of the present invention and incorporated herein by reference. In the just-mentioned patent application, a redundant packet switching architecture is disclosed which comprises a cellular base station in communication with the Public Switched Telephone Network (PSTN) through an ISDN switch. Hardware redundancy is provided among network interface resources that interface the cellular base station to the PSTN.
For example, consider the wireless communication system 100 of FIG. 1. FIG. 1 illustrates a Base Station Transceiver Subsystem (BTS) 102 in communication with a Base Station Controller Subsystem (BSC) 114. On the forward link, BSC Distribution and Consolidation Subsystem (BSC DISCO) 118 routes voice signals and other data from various sources (not shown) to BSC Network Interface Equipment (BSC NIE) 116 for further routing to BTS 102. BSC NIE 116 routes the voice signals and data and also clock signals over T1, line 112 to BTS Network Interface Equipment (NIE) 110. NIE 110 and 116 which may each be an Inverse Multiplexer (IMUX), Channel Service Unit (CSU), or other conventional type of interface, translate between the T1, format and a Base Station Communication Network (BCN) format. BTS NIE 110 passes the data over lines 108 to at least one of the N Base Station Communication Network Interface Cards (BCNIC) 106A-106N resident in BTS DISCO 104. BTS DISCO 104 then routes the incoming data to the appropriate BTS 102 resources (not shown) which, in turn, transmit the data to one or more Mobile Stations (MS) 101. The converse path is followed for the reverse link from the MS to the BSC. BSC DISCO 118 and BTS DISCO 104 are similar in nature and structure and are further described in the above mentioned U.S. patent application Ser. No. 08/513,306. BSC DISCO 118 may also employ the present invention, and communicate with other BSC's (not shown).
As shown in FIG. 1, hardware redundancy on the order of 1:N may be provided for BCNICs 106A-106N. When one of the BCNICs fails, for example BCNIC 106A, the redundant BCNIC 106N is automatically switched in to replace the failed unit. Furthermore, in an effort to prevent catastrophic failure, the BCNICs 106A-106N are sequentially tested by Controller 105 taking one at a time "off-line" to perform diagnostic and functional testing as described in the above-mentioned patent application Ser. No. 08/513,306. As each of the BCNICs 106A-106N completes off-line testing, it is placed back in service, and the next BCNIC 106A-106N is then removed from service to be tested. This cyclic sequential testing controller by controller 105 is often referred to as "roving test," and decreases the probability of a catastrophic failure by orders of magnitude. Thus, there are two ways in which the BCNICs 106A-106N are switched in and out of service; for maintenance purposes (i.e. "roving" ), and also upon actual failure.
When switching between these redundant communication resources, it is clearly desirable to eliminate any loss or corruption of data, because the data may not be recoverable, and in any case, it may take a significant amount of time to re-synchronize the BTS NIE 110 with the BSC NIE 116 after discovering the error and perhaps resetting. At very high data rates, such as on the order of 10 Mbps, the problem of error-free switching between redundant data sources is exacerbated by the finite switching time necessary to bring an "off-line" data source to an "on-line" state. That is to say that it may not be possible to reliably and automatically switch one BCNIC 106A "off-line" and also switch a replacement BCNIC 106N "on-line" within a single clock pulse at high data speeds.
For example, consider a BCNIC 106A clocking data in/out to the BTS NIE 110 at an exemplary data rate of 10 Mbps. At this rate, the clock period is 100 ns, which means one clock pulse is either "high" or "low" for only 50 ns. If one takes into account the realities of clock jitter, clock skew, and lot-to-lot component variation among clock drivers, the clock pulse will not be perfectly square, and may only be 30 ns or 40 ns in duration. In order to make a reliable switch between the two redundant cards without losing data, the "off-line" BCNIC 106N would need to detect the proper clock edge, and then turn on its data drivers, whereas the "on-line" BCNIC 106A would need to properly detect the same clock edge, and then turn off its drivers after the "off-line" BCNIC 106N had turned its data drivers on. This manner of switching is often referred to as "make before break". There is a high probability that not all of these events would occur properly, in which case both BCNICs 106A and 106N could be driving data out during this same time, causing contention which could last for more than a single clock pulse, perhaps longer than 50 ns, and result in errors in the data. Alternately, the failure to make an effective "make before break" switch could result in a period where neither BCNIC 106A or 106N is driving data or clock signals. Thus, a method and system is needed to provide reliable switching among redundant high-speed data sources.
In a conventional network interface between a BSC NIE 116 and a BTS NIE 110 over a T1, line 112, BSC NIE 116 the provides a network reference clock signal for synchronous communications of data. The BTS NIE 110 may derive a local transmit clock signal from the network reference clock, an internal oscillator (not shown), or perhaps a separate stable time reference such as a GPS receiver (not shown). BTS NIE 110 provides the local transmit clock to the BCNICs 106A-106N. In response to the local transmit clock signal, data is clocked out from the BCNIC 106A-106N, and into the BTS NIE 110. In response to the network reference clock signal provided by BSC NIE 116, data is clocked out from the BTS NIE 110 over the T1, line 112 to the BSC 114 for further routing to its destination address. By industry standards, the data clocked out on the T1, line 112 between the BSC NIE 116 and the BTS NIE 110 is packetized into frames, with the 193rd bit in each frame being reserved for overhead signaling or synchronization use. Since no user data is provided on the forward link from the BSC NIE 116 during this 193rd bit, the BTS NIE 110 generally does not provide user data to the BSC NIE 116 on the reverse link in response to the 193rd network reference clock signal either, and thus the BTS NIE 110 generally does not replicate the 193rd network reference clock signal in generating its local transmit clock signal for use by the BCNICs 106A-106N. It should be noted that there may be some delay between the 193rd network reference clock signal and the local transmit clock signal.
In the BTS NIE 110, it is a conventional design matter to provide a FIFO (not shown in FIG. 1) in the serial data path and buffer the data in order to account for uncertainties in this network clock signal caused by such things as cable length delay (which may be on the order of 1.5 ns per foot), internal delays within the BSC 114 switching equipment and the BTS 102 equipment, and clock tolerances. Such a FIFO is also useful for allowing a "margin of safety" needed when switching or "roving" between redundant data sources, such as the BCNICs 106A-106N. The "margin of safety" provided by such a FIFO is proportional to its depth. The deeper the FIFO, the more data can be stored, and thus the longer it would take to overflow if data was clocked into it by the BCNIC 106A-106N faster than it was clocked out onto the T1, line 112 by the NIE 110. However, deeper FIFOs generally cost more than shallower ones. Additionally, regardless of how deep a FIFO is, it may still fail to prevent data errors if it underflows if the BCNIC 106A-106N missed several clock pulses from the network, and thus failed to send any data. In either case, an underflow or an overflow would generally causes a reset of the NIE 110 and the accompanying re-synchronization time.
In a perfect system, the FIFO in the NIE 110 would remain one-half full. Additionally, in that perfect system, the switching among redundant data sources would occur instantaneously without any errors or gaps in the data. However, due to the uncertainties mentioned above, as well as the need for high-speed data communications there is a clear need for a reliable high-speed data system that can reliably switch between redundant data sources without introducing data errors.